package my_practice;

import java.util.*;

public class Example2_4 {

	public static void main(String args[])
	{
		Scanner reader=new Scanner(System.in);
		double sum=0;
		int m=0;
		while(reader.hasNextDouble())//等待用户从键盘输入数据
		{
			double x=reader.nextDouble();//读取数据
			m++;
			sum+=x;
		}
		reader.close();
		System.out.printf("%d个数的和为%f\n", m,sum);
		System.out.printf("%d个数的平均值是%f\n", m,sum/m);
	}

}
